<template>
	<view class="content">
		<view class="title">{{title}}</view>
		<view class="art-content">
			<rich-text class="richText" :nodes="strings"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '',
				strings : ''
			}
		},
		onLoad:function(e){
			console.log(e);
			uni.request({
				url: 'http://wd1900144.pro.wdcase.com/carApi/news.php',
				method: 'GET',
				data: {
					act:'detail',
					nid:e.nid
				},
				success: res => {
					console.log(res);
					this.title = res.data.detail.title;
					this.strings = res.data.detail.content;
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>
.content{padding:10upx 2%; width: 96%; flex-wrap:wrap;}
.title{line-height:2em; font-weight:700; font-size:38upx;}
.art-content{line-height:2em;}
</style>
